package com.xiaohong.account.fallback;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xiaohong.account.feign.AccountTblFeign;
import com.xiaohong.account.pojo.AccountTbl;
import entity.Result;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author : xiaohong
 * @date : 2021/4/2 18:21
 */
@Component
public class AccountFallback implements AccountTblFeign {
    @Override
    public Result update(AccountTbl accountTbl, Integer id) {
        System.out.println("数据:"+ accountTbl+"和"+id);
        throw new RuntimeException("account错误，错误日志已保存数据库了哦");
//        return new Result(false, StatusCode.ERROR,"更新错误，错误日志已保存数据库");
    }

    @Override
    public Result add(AccountTbl accountTbl) {
        return null;
    }

    @Override
    public Result<AccountTbl> findById(Integer id) {
        return null;
    }

    @Override
    public Result<List<AccountTbl>> findAll() {
        return null;
    }

    @Override
    public Result<Page> findPage(AccountTbl accountTbl, int page, int size) {
        return null;
    }

    @Override
    public Result<Page> findPage(int page, int size) {
        return null;
    }

    @Override
    public Result<List<AccountTbl>> findList(AccountTbl accountTbl) {
        return null;
//        return new Result(false, StatusCode.ERROR,"查询失败");
    }

    @Override
    public Result delete(Integer id) {
        return null;
    }
}
